import request from '@/utils/request'
export const urlPrefix = '/sys/loginlog/'

// 查询登录日志列表
export function list(query) {
  return request({
    url: urlPrefix,
    method: 'get',
    params: query
  })
}

// 删除登录日志
export function delLoginLog(id) {
  return request({
    url: urlPrefix + id,
    method: 'delete'
  })
}

// 解锁用户登录状态
export function unlockLoginLog(username) {
  return request({
    url: urlPrefix + `unlock/${username}/`,
    method: 'get'
  })
}

// 清空登录日志
export function cleanLoginLog() {
  return request({
    url: urlPrefix + 'clean/',
    method: 'delete'
  })
}
